/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package factory;

/**
 *
 * @author OAKLAND
 */
public class Singleton {
    private static Singleton INSTANCE = null;
    private Singleton() {
    }
    private synchronized static void createInstance(){
        if(INSTANCE == null){
            INSTANCE = new Singleton();
        }
    }
    public static Singleton getInstance() {
        createInstance();
        return SingletonHolder.INSTANCE;
    }
    
    private static class SingletonHolder {

        private static final Singleton INSTANCE = new Singleton();
    }
}
